import request from '@/utils/request'

// 查询呼叫记录列表
export function listCallRecord(query) {
  return request({
    url: '/parking/call/record/list',
    method: 'get',
    params: query
  })
}

// 查询呼叫记录
export function getCallRecord(recordId) {
  return request({
    url: '/parking/call/record/' + recordId,
    method: 'get'
  })
}

// 处理呼叫记录
export function activeCall(data) {
  return request({
    url: '/parking/call/record/activeCall',
    method: 'put',
    data: data
  })
}

// 处理呼叫记录
export function handling(data) {
  return request({
    url: '/parking/call/record/handling',
    method: 'put',
    data: data
  })
}


// 完成呼叫记录
export function complete(data) {
  return request({
    url: '/parking/call/record/complete',
    method: 'put',
    data: data
  })
}

// 删除呼叫记录
export function delCallRecord(recordId) {
  return request({
    url: '/parking/call/record/' + recordId,
    method: 'delete'
  })
}

// 机房和消防报警数量
export function getFireAndRobotAlarmCount(recordId) {
  return request({
    url: '/parking/dashboard/getFireAndRobotAlarmCount',
    method: 'get'
  })
}

// 业主和访客数量
export function getOwnerAndVisitorCount(recordId) {
  return request({
    url: '/parking/dashboard/getOwnerAndVisitorCount',
    method: 'get'
  })
}

// 工单记录
export function listWorkOrders(recordId) {
  return request({
    url: '/parking/dashboard/listWorkOrders',
    method: 'get'
  })
}

// 物业通知
export function listNotices(recordId) {
  return request({
    url: '/parking/dashboard/listNotices',
    method: 'get'
  })
}

// 报警记录
export function listAlarmRecords(query) {
  return request({
    url: '/parking/dashboard/listAlarmRecords',
    method: 'get',
    params: query
  })
}
